package ui.view;

import java.awt.Component;
import javax.swing.JOptionPane;
import static constants.GTextbookConstants.English;
import static constants.GTextbookConstants.Chinese;

public class LangWarningPane extends JOptionPane{
	
	public static void showMessageDialog(Component parentComponent, Object engMessage, Object chiMessage, String engTitle, String chiTitle, int messageType, int language){
		if(language == English){
			showMessageDialog(parentComponent, engMessage, engTitle, messageType);
		}
		if(language == Chinese){
			showMessageDialog(parentComponent, chiMessage, chiTitle, messageType);
		}
	}
	
	public static int showConfirmDialog(Component parentComponent, Object engMessage, Object chiMessage, String engTitle, String chiTitle, int optionType, int messageType, int language){
		int result = 0;
		
		if(language == English){
			result = showConfirmDialog(parentComponent, engMessage, engTitle, optionType, messageType);
		}
		if(language == Chinese){
			result = showConfirmDialog(parentComponent, chiMessage, chiTitle, optionType, messageType);
		}
		
		return result;
	}

}
